# -- coding: utf-8 -- 
# Name: app

from flask import Flask
import time

app = Flask(__name__)
@app.before_first_request
def before_first_request():
    print('there is before_first_request')
@app.before_request
def before_request():
    print('there is before_request')
@app.after_request
def after_request(response):
    print('there is after_request')
    response.headers['Content-Type'] = 'application/json'
    return response
@app.teardown_request
def teardown_request():
    print('there is teardown_request')
@app.route('/')
def hello_world():
    print('welcome to index')
    time.sleep(5)
    return 'hello world!'

if __name__ == '__main__':
    app.run(port=8899,debug=True)



















